#ifndef QSFMLSCREEN_H
#define QSFMLSCREEN_H

#include "QSFMLCanvas.h"
#include "SFML/Graphics.hpp"
#include "SFML/Audio.hpp"
#include "tileset.h"
#include "gamemap.h"
#include "unitIA.h"

#include "unitIA.h"


class QSFMLScreen : public QSFMLCanvas
{
    //A SFML powered QWidget
public :
    QSFMLScreen(QWidget* parent, const QPoint& position, const QSize& size, const QString mapOugames, bool mapOugame);
    virtual ~QSFMLScreen();
    GameMap* getGameMap() { return m_gameMap; }

    bool isAnimating() const;

private :
    void OnInit();
    void mouseMoveEvent(QMouseEvent* e);
    void mousePressEvent(QMouseEvent* e);
    void OnUpdate();

    QWidget* m_parent;

    sf::Sprite m_tileSprite;
    sf::Sprite m_possibleMoveSprite;
    sf::Shape m_pathShape;
    sf::Shape m_selectShape;
    QList<QPoint> m_activePath;

    Tileset* m_tileset;
    Team m_playerTeam;
    GameMap* m_gameMap;
    Map* m_map;

    Unit* m_selectedUnit;
    bool m_animating;

    sf::Music m_battleMusic;
    sf::Sound m_gameOverSound;
};

#endif // QSFMLSCREEN_H
